package com.gf.forcesystem;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import java.time.LocalDate;
import java.util.concurrent.TimeUnit;

/**
 * @author gaofei
 * @date 2022/6/19 15:15
 */
@SpringBootApplication(scanBasePackages = "com.gf")
@EnableScheduling
@Slf4j
public class ForceSystemApplication {
    public static void main(String[] args) {
        SpringApplication.run(ForceSystemApplication.class, args);
    }

//    @Scheduled(fixedDelay = 1, timeUnit = TimeUnit.SECONDS)
//    public void checkTime() throws InterruptedException {
//        LocalDate time = LocalDate.of(2023, 6, 1);
//        if (LocalDate.now().compareTo(time) > 0) {
//            log.info("软件已过期，请联系管理员");
//            Thread.sleep(1000);
//            System.exit(0);
//        }
//    }
}
